<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateBuycarsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('buycars', function (Blueprint $table) {
            $table->increments('bid');
            $table->integer('aid');
            $table->integer('cid');
            $table->integer('uid');
            $table->string('p_contact_name',32);
            $table->string('p_contact_tel',32);
            $table->integer('p_brand');
            $table->integer('p_subbrand');
            $table->integer('p_subsubbrand');
            $table->string('p_name',32);
            $table->string('p_allname',50);
            $table->integer('p_model');
            $table->decimal('p_price',8,2);
            $table->integer('p_age');
            $table->integer('p_addtime');
            $table->integer('p_kilometer');
            $table->string('p_details',512);
            $table->integer('isshow');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('buycars');
    }
}
